// Factory.cpp 
 
#include  "factory.h" 
#include  "product.h" 
 
#include  <iostream> 
using namespace std; 
 
Factory::Factory() 
{ 
 
}

Factory::~Factory()
{


}

ConcreteFactory::ConcreteFactory()
{
    pPro = NULL;
	cout<<"ConcreteFactory..."<<endl;
}

ConcreteFactory::~ConcreteFactory()
{
	if (pPro != NULL)
	{
		delete pPro;
		cout<<"-----delete pPro--------\n"<<endl;	
	}
}

Product* ConcreteFactory::CreateProduct()
{

	pPro = new ConcreteProduct();
	return pPro;
}